ActionController::Routing::Routes.draw do |map|
  map.resources :galleries

  map.resources :pictures

  map.resources :sites

  map.resources :canvas_states

  map.resources :document_categories do |dc|
    dc.resources :documents, :member => {:destroy_version => :delete}
  end

  map.resources :documents

  map.resources :sessions

  map.resources :users

  map.resources :user_groups

  map.resources :permissions

  map.login '/login', :controller => 'sessions', :action => 'new'
  map.logout '/logout', :controller => 'sessions', :action => 'destroy'

  map.resources :folders

  map.resources :functions

  map.resources :messages

  map.resources :pages, :collection => { :links => :get }

	map.home '', :controller => 'home', :action => 'index'

  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'

  map.dynamic_p1 ':p1', 
									:controller => "contents", 
									:action => "show", 
                  :requirements => {:p1 => /[\w|-]*/}
end
